Skip to content

modify shasum check command#399

Closed
lgrn wants to merge 1 commit intofreebsd:mainfrom
lgrn:main
Closed

modify shasum check command#399
lgrn wants to merge 1 commit intofreebsd:mainfrom
lgrn:main

Conversation

@lgrn
Copy link
Contributor

@lgrn lgrn commented Jul 26, 2024

by default, sha256sum and sha512sum will look for any file mentioned in the CHECKSUM file, which is all of them:

$ wc -l < CHECKSUM.SHA512-FreeBSD-14.1-RELEASE-amd64
10

with the current command, this will lead to 9 failures and 1 OK. the fact that you specify the filename to be checked does not seem to mean that is the only file that is checked.

for this reason, I suggest that the filename to be checked is removed, and replaced with the flag --ignore-missing which is present in both commands on both BSD and Linux.

this flag means that all files mentioned will be checked, just like before, but output will only be returned for successful checks. example:

$ sha512sum -c CHECKSUM.SHA512-FreeBSD-14.1-RELEASE-amd64 --ignore-missing
FreeBSD-14.1-RELEASE-amd64-memstick.img: OK

this assumes that the img file is in the same directory, but this was already assumed in the previous version.

@concussious
Copy link
Contributor

Adding --ignore-missing is a nice improvement, but I don't think switching the example to sha512 is. AFAIK sha512 requires a good deal more resources and provides no additional benefit for this application.

@lgrn
Copy link
Contributor Author

lgrn commented May 26, 2025

Adding --ignore-missing is a nice improvement, but I don't think switching the example to sha512 is.

I've changed the commit to simply replace the filename with --ignore-missing instead in the two occurrences I found.

@concussious
Copy link
Contributor

LGTM. I think just fix the author -- "All commits have, as the author, your name and valid email address as you would like to see them in the FreeBSD repository. Fake github.com addresses cannot be used." ~FreeBSD-src/CONTRIBUTING.md

by default, sha256sum and sha512sum will look for any file mentioned in
the CHECKSUM file, which is all of them:

$ wc -l < CHECKSUM.SHA512-FreeBSD-14.1-RELEASE-amd64
10

with the current command, this will lead to 9 failures and 1 OK. the
fact that you specify the filename to be checked does not seem to mean
that is the *only* file that is checked.

for this reason, I suggest that the filename to be checked is removed,
and replaced with the flag --ignore-missing which is present in both
commands on both BSD and Linux.

this flag means that all files mentioned will be checked, just like
before, but output will only be returned for successful checks.

this assumes that the img file is in the same directory, but this was
already assumed in the previous version.
@lgrn
Copy link
Contributor Author

lgrn commented May 26, 2025

Fixed author and email in c22c9c5

@concussious concussious self-assigned this Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants